Part Number Hot Search : 
M66260 400000 D1861A H472J NTE951 GPDP4189 05SSL20 1797F
Product Description
Full Text Search
 

To Download AN1478 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 AN1478 APPLICATION NOTE
PORTING AN ST7 PANTA PROJECT TO CODEWARRIOR IDE
by Microcontroller Division Applications
INTRODUCTION
Hiware was been acquired by Metrowerks in July 2000. As a result, PANTA IDE (from Hiware) is still supported but won't be improved or modified. It has been replaced by CodeWarrior IDE from Metrowerks. This application note explains how to switch from Panta to Metrowerks.
AN1478/0102
1/6
1
PORTING AN ST7 PANTA PROJECT TO CODEWARRIOR IDE
1 PROJECTS
Projects previously created with Panta need to be re-created when you intend to build them using CodeWarrior. The major difference between Panta and CodeWarrior is that Panta projects were built using a make file and CodeWarrior is uses an integrated build engine rather than a make utility to build a project. Importing a make file into CodeWarrior is not recommended. Porting a Panta Project to CodeWarrior is performed in the following steps:
s s s s s s
Create a project (this step is mandatory) Add files to the project (this step is mandatory) Set the options (this step is optional) Set the Paths (this step is mandatory) Select a PRM File (this step is mandatory) Set the debugger environment (this step is optional)
1.1 CREATING A PROJECT Create your project using the appropriate Stationery. A project stationery is usually available for each target interface and each MCU. Creating a project based on the appropriate Stationery minimizes the time you need to get a working project. In order to Create a project:
s s s s s s
Select "File|New". The New dialog box is opened. On the left hand side select the Stationery for the CPU you intend to use In the "location" edit box browse to your project directory In the "Project name" indicate the name of your project. Click "OK". The "New Project" directory is opened. Select the appropriate stationery according to the MCU you intend to use and the target interface you want to use for debugging (for example "Simulator" -> "C Generic" if you intend to develop an ANSI C project for simulation). Press "OK". The IDE prepares the environment for your new project. When the project is successfully created, a project window (.mcp) is opened.
s s
The frame for your project has been created.
2/6
2
PORTING AN ST7 PANTA PROJECT TO CODEWARRIOR IDE
1.2 ADDING FILES TO A PROJECT The source files in the project must be added to the project.
s s s
Remove the file main.c from the project. Your own project already contains a main function. From the Window Explorer, duplicate all your source and PRM files in your project. Insert all your sources, BBL and PRM files in your CodeWarrior project. When you insert a source file into your project, the path to the inserted source file is added to the project access paths automatically. Do not add the include file to the project.
2 SETTINGS
2.1 SETTING OPTIONS In a Panta project, compiler, assembler and linker options are stored in the project .pjt file. These options should be transferred to the CodeWarrior project. To do this:
s
Open the Project setting dialog box by clicking on the project settings icon :
s
Open the panta project .pjt file in any text editor (CodeWarrior for example).
2.2 SETTING COMPILER OPTIONS
s
In the .pjt file, search for the group [C????_Compiler], where ???? stands for the CPU name. In this Group, find the "Options" entry. Select the command line specified in the options entry and copy it to the clipboard using +C. In the project setting dialog box, select the "Compiler for ????" tab. In the "Command Line Argument edit box, append the command line you have stored in the clipboard using +V. If you have used a custom make file to build your application, you can also append the compiler options you have inserted in the make file to the Command Line argument. Click on "Apply" to save your changes.
s
s
s
s
3/6
PORTING AN ST7 PANTA PROJECT TO CODEWARRIOR IDE
2.3 SETTING ASSEMBLER OPTIONS
s
In the .pjt file, search for the group [A????_Assembler], where ???? stands for the CPU name. In this Group, find the "Options" entry. Select the command line specified in the options entry and copy it to the clipboard using +C. In the project setting dialog box, select the "Assembler for ????" tab. In the "Command Line Argument edit box, append the command line you have stored in the clipboard using +V. If you have used a custom make file to build your application, you can also append the assembly options you have inserted in the make file to the Command Line argument. Click on "Apply" to save your changes.
s
s
s
s
2.4 SETTING LINKER OPTIONS
s s
In the .pjt file, search for the group [LINKER]. In this Group, find the "Options" entry. Select the command line specified in the options entry and copy it to the clipboard using +C. In the project setting dialog, select the "Linker for ????" tab. In the "Command Line Argument edit box, append the command line you have stored in the clipboard using +V. If you have used a custom make file to build your application, you can also append the linker options you have inserted in the make file to the Command Line argument. Click on "Apply" to save your changes.
s
s
s
2.5 SETTING PATHS In order to make sure CodeWarrior is able to locate all the source, header, object and executable files, make sure to include the paths to each directory where these files are located.
s
Open the Project setting dialog box by clicking on the project settings icon :.
s s
Select the "Access Paths" tab. Make sure that all directories, where source files are located, are listed here. If this is not the case, add the new paths using the "Add ..." button. Click on "Apply" to save your changes.
s
4/6
PORTING AN ST7 PANTA PROJECT TO CODEWARRIOR IDE
2.6 SELECTING THE PRM FILE Modify your PRM file associated with your project.
s
Open the Project setting dialog box by clicking on the project settings icon:
s s
Select the "Linker for ????" tab and modify the PRM file name. If you were using a custom PRM file in your Panta project, check "Use Custom PRM File" and browse to the PRM file. If you were using a template PRM file in your Panta project, check "Use Template PRM File" and select one of the proposed template PRM files. Modify the "Application Filename" with the name of the executable file you want to generate. Click on "Apply" to save your changes.
s
s s
Be careful, with Panta the NAMES block in the template PRM files was not empty. CodeWarrior assumes the block is empty. If you want to use a template PRM file in your application, make sure to remove the ANSI library and start module from your project. 2.7 SETTING THE DEBUGGER ENVIRONMENT In your CodeWarrior project, the debugger is still an external tool. In order to transfer your Panta Debugger settings into your CodeWarrior project:
s s
Open the panta project .pjt file in any text editor (CodeWarrior for example). Open the file project.ini located in your project directory in any text editor (CodeWarrior for example). Copy the content of the [HI-WAVE] group from your PJT file to the project.ini file. In your PJT file you will find a group dedicated to the target interface you are using. This group is called [Simulator ST7] for instance, and so on. You can copy the content of this group to your project.ini file. Some specific environment variables may have been defined in the [Environment Variables] group from the pjt file (for example RESET_VECTOR, EEPROM_START, ...). This variable initialization may also be copied to the project.ini.
s s
s
5/6
PORTING AN ST7 PANTA PROJECT TO CODEWARRIOR IDE
"THE PRESENT NOTE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH A NOTE AND/OR THE USE MADE BY CUSTOMERS OF THE INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS."
Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. No license is granted by implication or otherwise under any patent or patent rights of STMicroelectronics. Specifications mentioned in this publication are subject to change without notice. This publication supersedes and replaces all information previously supplied. STMicroelectronics products are not authorized for use as critical components in life support devices or systems without the express written approval of STMicroelectronics. The ST logo is a registered trademark of STMicroelectronics 2002 STMicroelectronics - All Rights Reserved. Purchase of I2C Components by STMicroelectronics conveys a license under the Philips I2C Patent. Rights to use these components in an I2C system is granted provided that the system conforms to the I2C Standard Specification as defined by Philips. STMicroelectronics Group of Companies Australia - Brazil - Canada - China - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - U.S.A. http://www.st.com
6/6
(c)


▲Up To Search▲   

 
Price & Availability of AN1478

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X